{{extend '../_layouts/home.html'}}

{{block 'title'}}{{'多人博客 - 首页'}}{{/block}}

{{block 'body'}}
<section class="container">
  <div class="row">
    <div class="col-md-5">
      <form id="topic_form" action="/topics/new" method="post">
        <div class="form-group">
        <input type="hidden" value="{{user._id}}" name="userId">
        </div>
        <div class="form-group">
          <label for="exampleInputEmail1">选择板块</label>
          <select class="form-control" name="type">
            <option>分享</option>
            <option>问答</option>
            <option>招聘</option>
            <option>客户端测试</option>
          </select>
        </div>
        <div class="form-group">
          <label for="exampleInputEmail1">标题</label>
          <input type="text" class="form-control" id="exampleInputEmail1" placeholder="标题" name="title">
        </div>
        <div class="form-group">
          <label for="exampleInputPassword1">内容</label>
          <textarea class="form-control" rows="3" name="article"></textarea>
        </div>
        <button type="submit" class="btn btn-default">Submit</button>
      </form>
    </div>
  </div>
</section>
<script src="/node_modules/jquery/dist/jquery.min.js"></script>
<script>
    /*$('#topic_form').on('submit',function(e) {
      e.preventDefault()
      var formData = $(this).serialize()
      $.ajax({
        url:'/topics/new',
        type:'post',
        data:formData,
        dataType:'json',
      })
    })*/
</script>
{{/block}}
